<template>
  <div
    class="popup-box popup-box-1"
    @click.self="showPopup = false"
    v-if="showPopup"
  >
    <div class="popup-body">
      <div class="body-title">
        <div>全部付款方式</div>
        <div
          @click="showPopup = false"
          class="iconfont icon-guanbi font-size-22"
        ></div>
      </div>

      <scroll-view scroll-y>
        <div class="body-data">
          <div class="item" v-for="(item, i) in 6" :key="i">
            <div class="iconfont icon-guanbi"></div>
            <div>扫码付</div>
          </div>
        </div>
      </scroll-view>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";
const showPopup = ref(false);
function open() {
  showPopup.value = true;
}

defineExpose({ open });
</script>
<style lang="scss" scoped>
.popup-box-1 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;

  .popup-body {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 754rpx;
    height: 460rpx;
    border-radius: 20rpx;
    overflow: hidden;
    background: $uni-bg-color-1;

    .body-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16rpx 30rpx;
      background: $uni-text-color-inverse;
    }
    .body-data {
      padding: 20rpx 30rpx;
      display: flex;
      flex-wrap: wrap;
      gap: 18rpx;
      .item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 160rpx;
        height: 120rpx;
        border-radius: 8rpx;
        background: $uni-text-color-inverse;
        font-size: 18rpx;
        color: $uni-text-color-1;
        .iconfont {
          width: 48rpx;
          height: 48rpx;
          line-height: 48rpx;
          text-align: center;
          font-size: 48rpx;
          margin-bottom: 8rpx;
        }
      }
    }
  }
}
</style>
